package com.xnyzc.lhy.task.task.tongcheng;

import lombok.extern.slf4j.Slf4j;

import com.xnyzc.lhy.task.fegin.tongcheng.TcOrderTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component("OrderTask")
public class OrderTask {

    @Autowired
    private TcOrderTaskService service;

    /**
     * 轮询检查订单是否到期
     * 定时任务调用，每隔1分钟调用1次
     */
    @Scheduled(cron = "0 0/1 * * * ?")
    public void checkOrderState() {
        service.checkOrderState();
    }
}